package game;
import java.util.LinkedList;

import chess.*;

public class ItemList extends LinkedList< ItemNode>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 3865801466485182550L;
	ItemNode node;

	public int getPositionItem(int x,int y){
		for(int i=0;i<this.size();i++){
			node=this.get(i);
			if(node.p.x==x&&node.p.y==y&&node.alive){
				return i;
			}
		}
		return -1;
		
	}

}
